//
//  PTBasePageBodyView.h
//  PlushGame
//
//  Created by aron on 2017/11/23.
//  Copyright © 2017年 aron. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol PTPageBodyViewDelegate, PTPageBodyViewDataSource;

@interface PTBasePageBodyView : UIView

@property (nonatomic, weak) id<PTPageBodyViewDelegate> delegate;
@property (nonatomic, weak) id<PTPageBodyViewDataSource> dataSource;

- (void)moveToIndex:(NSInteger)index;

- (void)reloadData;

@end



//______________________________________________________________________________________________________________

@protocol PTPageBodyViewDelegate <NSObject>

- (void)bodyView:(PTBasePageBodyView *)bodyView didSelectItemAtIndex:(NSInteger)index;
- (void)bodyView:(PTBasePageBodyView *)bodyView didScrollWithOffset:(CGFloat)offset;

@end


//_______________________________________________________________________________________________________________

@protocol PTPageBodyViewDataSource <NSObject>

@required

- (NSInteger)numberOfItemsInBodyView:(PTBasePageBodyView *)bodyView;
- (UIViewController *)bodyView:(PTBasePageBodyView *)bodyView viewControllerAtIndex:(NSInteger)index;

@end
